import { createApp } from 'vue'
import App from '@/App.vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import router from './router'
import i18n from './locales'
//配置element-plus国际化
//@ts-ignore
import 'virtual:svg-icons-register';
//引入自定义插件对象：注册整个项目全局组件
import gloablComponent from './components/index';
const app = createApp(App)
const pinia = createPinia()  // 先创建 pinia
//安装自定义插件
app.use(gloablComponent)
app.use(pinia)  // **必须先 use pinia**
app.use(ElementPlus, { locale: zhCn })
app.use(router)
app.use(i18n)

app.mount('#app')
